<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
</head>
<body>
    <script>
    function test(){
        alert(1);
        $.ajax({
            url:"json/a.txt",
            dateType:"json",
            success(data){
                var value = JSON.parse(data);
                alert(value.name)
            },
            error(err){
                alert(err.status)
            }
        });
        alert(2);
    }
    test();
    </script>
</body>
</html>